﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/philadmin/Philadmin.Master"
    CodeBehind="ViewTours.aspx.vb" Inherits="Phila.ViewTours" %>

<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%" cellpadding="3" cellspacing="3" align="center">
        <tr>
            <td>
                <h1>
                    View Tours</h1>
                <div align="right">
                    <%--    <div class="addnew">
                        <div class="floatleft">
                            <asp:LinkButton ID="btnExport" runat="server" Text="Export to Excel" CssClass="export"></asp:LinkButton>
                            <a href="ViewTours.aspx?type=cruise" class="cruise">Cruises</a>
                            <a href="ViewTours.aspx?type=safari" class="safari">Safari</a>
                            <a href="ViewTours.aspx?type=short" class="short">Short Breaks</a>
                        </div>
                        <a href="EditTour.aspx">Add New</a>
                    </div>
                </div>
                    <div align="center">
                        <asp:Label ID="lblMsg" runat="server"></asp:Label></div>
                    <div class="errmsg">
                        <asp:Label ID="lblError" runat="server" Font-Bold="true" ForeColor="red"></asp:Label></div>
                    <div class="clear">
                    </div>
                    <asp:GridView ID="gvTours" runat="server" ShowHeader="true" ShowFooter="true" AutoGenerateColumns="false"
        Width="100%" CssClass="grid">
                            <Columns>
                                <asp:BoundField HeaderText="Id" DataField="Id" />
                                <asp:BoundField HeaderText="Name" DataField="Name" />
                                <asp:BoundField HeaderText="TourCode" DataField="TourCode" />
                                <asp:BoundField HeaderText="Days" DataField="Days" />
                                <asp:BoundField HeaderText="Nights" DataField="Nights" />
                                <asp:CheckBoxField HeaderText="IsActive" DataField="IsActive" />
                                <asp:CommandField ShowEditButton="True" />
                            </Columns>
                    </asp:GridView>--%>
            </td>
        </tr>
    </table>
    <div align="right">
        <div class="addnew">
            <div class="floatleft">
                <asp:LinkButton ID="btnExport" runat="server" Text="Export to Excel" CssClass="export"></asp:LinkButton>
                <a href="ViewTours.aspx?type=cruise" class="cruise">Cruises</a> <a href="ViewTours.aspx?type=safari"
                    class="safari">Safari</a> <a href="ViewTours.aspx?type=short" class="short">Short Breaks</a>
            </div>
        </div>
    </div>
    <div align="center">
        <asp:Label ID="lblMsg" runat="server"></asp:Label></div>
    <div class="errmsg">
        <asp:Label ID="lblError" runat="server" Font-Bold="true" ForeColor="red"></asp:Label></div>
    <div class="clear">
    </div>
    <radG:RadGrid ID="radGrid" runat="server" Width="99%" PageSize="20" AllowSorting="True"
        Skin="Telerik" AllowPaging="True" ShowGroupPanel="True" AutoGenerateColumns="False"
        GridLines="None" EnableAJAX="True" EnableAJAXLoadingTemplate="True" AllowFilteringByColumn="True">
        <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
        <MasterTableView Width="100%" GroupLoadMode="Client" GroupsDefaultExpanded="False"
            CommandItemDisplay="Top" DataKeyNames="ID">
            <CommandItemTemplate>
                <table width="100%" border="0">
                    <tr>
                        <td valign="top" align="right">
                            <a href="EditTour.aspx">
                                <img src="../RadControls/Grid/Skins/AddRecord.gif" align="absmiddle" />Add New</a>
                        </td>
                    </tr>
                </table>
            </CommandItemTemplate>
            <RowIndicatorColumn Visible="False">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="False">
                <HeaderStyle Width="19px"></HeaderStyle>
            </ExpandCollapseColumn>
            <%--<GroupByExpressions>
                                <radG:GridGroupByExpression>
                                    <SelectFields>
                                        <radG:GridGroupByField FieldAlias="CatName" FieldName="CatName" HeaderText="Country Name" />
                                    </SelectFields>
                                    <GroupByFields>
                                        <radG:GridGroupByField FieldName="CatName" FieldAlias="CatName" HeaderText="Country Name" />
                                    </GroupByFields>
                                </radG:GridGroupByExpression>
                            </GroupByExpressions>--%>
            <Columns>
                <radG:GridTemplateColumn AllowFiltering="False" Groupable="false" UniqueName="TemplateEditColumn"
                    HeaderText="Edit">
                    <ItemTemplate>
                        <a href="EditTour.aspx?tid=<%#DataBinder.Eval(Container.DataItem,"ID")%>">
                            <img src="../RadControls/Grid/Skins/Edit.gif" alt="Edit" title="Edit" style="border: 0px;" />
                        </a>
                    </ItemTemplate>
                    <HeaderStyle Width="30px" />
                </radG:GridTemplateColumn>
                <radG:GridBoundColumn SortExpression="Name" HeaderText="Name" HeaderButtonType="TextButton"
                    DataField="Name">
                </radG:GridBoundColumn>
                <radG:GridBoundColumn SortExpression="TourCode" HeaderText="Tour Code" HeaderButtonType="TextButton"
                    DataField="TourCode">
                    <HeaderStyle Width="120px" />
                </radG:GridBoundColumn>
                <radG:GridBoundColumn SortExpression="Days" HeaderText="Days" HeaderButtonType="TextButton"
                    DataField="Days">
                    <HeaderStyle Width="100px" />
                </radG:GridBoundColumn>
                <radG:GridBoundColumn SortExpression="Nights" HeaderText="Nights" HeaderButtonType="TextButton"
                    DataField="Nights">
                    <HeaderStyle Width="100px" />
                </radG:GridBoundColumn>
                <radG:GridCheckBoxColumn DataField="IsActive" HeaderText="IsActive" SortExpression="IsActive"
                    UniqueName="IsActive" EditFormColumnIndex="1">
                    <HeaderStyle Width="100px" />
                </radG:GridCheckBoxColumn>
                <radG:GridButtonColumn ConfirmText="Delete this record?" ButtonType="ImageButton"
                    ImageUrl="../RadControls/Grid/Skins/Delete.gif" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                    <HeaderStyle Width="20px" />
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" />
                </radG:GridButtonColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings AllowGroupExpandCollapse="true">
            <Selecting AllowRowSelect="False" />
        </ClientSettings>
    </radG:RadGrid>
</asp:Content>
